<!DOCTYPE html PUBLIC "-//W3C//Dth XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/Dth/xhtml1-transitional.dth">
<!--#include file="DataLoad.asp"-->

<html>
<head>
<title><%=GuildName%> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="DKP WOW GUILD">
<meta name="Description" content="">
<link href="<%=StylePath%>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<%=StylePath%>/styleplus.js"></script>
<style type="text/css" media="all">

</style>
<!--#include file="inc/ajax.asp"-->
</head>

<body>
<div class="header">
<!--#include file="menu.asp"-->
</div>
<div class="main">
<%if request("action")="Search" then call Search()%>
<div class="SearchFrame outframe">
	<h3>DKP查询</h3>
<form method=post action="?action=Search">
	<input class="inp" type="text" name="keyword" value=""><input class="btn" type="submit" value="查询">
	<%If SearchError<>"" Then Response.write "<br><b>"&SearchError&"</b>"%>
</form>
</div>

			<%
			select case Request("filter")
				case "战士"
				call playerlist("select * from player where player_profession='战士' order by player_name")
				case "法师"
				call playerlist("select * from player where player_profession='法师' order by player_name")
				case "牧师"
				call playerlist("select * from player where player_profession='牧师' order by player_name")
				case "盗贼"
				call playerlist("select * from player where player_profession='盗贼' order by player_name")
				case "猎人"
				call playerlist("select * from player where player_profession='猎人' order by player_name")
				case "德鲁伊"
				call playerlist("select * from player where player_profession='德鲁伊' order by player_name")
				case "术士"
				call playerlist("select * from player where player_profession='术士' order by player_name")
				case "圣骑士"
				call playerlist("select * from player where player_profession='圣骑士' order by player_name")
				case "死亡骑士"
				call playerlist("select * from player where player_profession='死亡骑士' order by player_name")
				case "萨满祭司"
				call playerlist("select * from player where player_profession='萨满祭司' order by player_name")
				case "按出场次数"
				call playerlist("select * from player order by player_raidNum desc")

				case "按种族"
				call playerlist("select * from player order by player_tribe desc")
				case "分霸"
				call playerlist("select top 10 * from player order by player_DKP desc")
				case "失踪人员名单"
				call playerlist("select top 50 * from player order by player_lastraid")
				case "all"
				call playerlist("select * from player order by player_name")
				case else
				call playerlist("")

			end select

			call view_playerpro()
			%>
</div>
<div id="footer"><!--#include file="footer.asp"--></div>

<script language="JavaScript">
	$("input[name=keyword]").focus(
		function () {
			if (this.value == "输入完整的角色名字") {
				this.attr("value","")
			};
		});
	

</script>

</body>
</html>
<%
Function ClassIconMenu(strSelected)
	Dim isActived
	isActived = False
	ClassIconMenu = ClassIconMenu & "<div class='IconMenu'>"
	For Ci = 0 To UBound(ArrTF)
		If strSelected = ArrTF(Ci)(0) Then
		ClassIconMenu = ClassIconMenu &"<a href='?' class='icobtn selected'><img src='images/icon/"&ArrTF(Ci)(2)&".png' alt='"&ArrTF(Ci)(langcode)&"' />"&getClassMemberCount(ArrTF(Ci)(0))&"</a>"
		isActived = true
		Else 
		ClassIconMenu = ClassIconMenu &"<a href='?filter="&Server.UrlEnCode(ArrTF(Ci)(0))&"' class='icobtn'><img src='images/icon/"&ArrTF(Ci)(2)&".png' alt='"&ArrTF(Ci)(langcode)&"' />"&getClassMemberCount(ArrTF(Ci)(0))&"</a>"
		End If
	Next
	If isActived = True Then ClassIconMenu = ClassIconMenu &" <a href='?' class='abtn'>显示全部职业</a>"
	ClassIconMenu = ClassIconMenu & "</div>"
End Function


sub playerlist(s)
	If s = "" Then 
	s = "select top 100 * from player order by player_lastraid desc"
	End If
	sql=s
	rs.open sql,conn,1,1
			If rs.recordcount > 99 Then response.write "<div class='message'><span>本页只显示了最近参加活动的前100人名单,点击<a href='player.asp?filter=all'>显示全部成员</a></span></div>"
			Response.write "<table class='playerlist outframe interlace'><tr><th colspan='9'><div class='title'><img src='images/icon/axe.jpg' width='64' height='64' border=0 alt=''>成员列表</div></th></tr>"
				Response.write "<tr><td colspan='6'>"&ClassIconMenu(Request("filter"))&"</td></tr>"
				Response.write "<tr class='coltitle'><td>Name</td><td width='100px'>"&selectDKPclass()&"</td><td>职衔</td><td>出场</td><td>最近一次</td><td width='50%'>装备获得</td></tr>"
		if rs.bof or rs.eof then
			Response.write "<tr><td colspan='9'>None</td></tr>"
		else
			for i = 1 to rs.recordcount
				Response.write "<tr><td><img src='"&getProfessionSmallIco(rs("player_profession"))&"' alt="&rs("player_profession")&" /> <img src='"&getRaceSmallIco(rs("player_tribe"))&"' alt="&rs("player_tribe")&" /> <a href='player_detail.asp?id="&rs("id")&"' name='playername'>"&rs("player_name")&"</a></td>"
				Response.write "<td class='dkp'>/</td>"
				Response.write "<td>"&rs("player_guildlevel")&"</td>"
				Response.write "<td>"&rs("player_raidnum")&"</td>"
				Response.write "<td>"&time_type(rs("player_lastraid"),3)&"</td>"
				Response.write "<td>"&getLootItemsLink(rs("player_looted"))&"</td>"
				Response.write "</tr>"&vbCrlf
				rs.movenext
				if rs.eof then exit for
			next
		end if
			Response.write "</table>"

	rs.close
end sub


Function selectDKPclass()
	SQL = "Select * from Raid_class"
	rs3.open sql,conn,1,1
	selectDKPclass = "<select name='dkpClassSelect'>"
	selectDKPclass = selectDKPclass & "<option value=''>选择DKP分类</option>"
	For index = 1 To rs3.recordcount
	selectDKPclass = selectDKPclass & "<option value='"&rs3("id")&"'>"&rs3("class_name")&"</option>"
	rs3.movenext
	Next
	rs3.close
	selectDKPclass = selectDKPclass & "</select>"
End Function


sub view_playerpro()
'职业比例
	Dim arrNum(25) , arrName(25) , arrANum(25) ,j , allcount ,allAcount
	j=0
	sql="select * from player order by player_profession desc"
	rs.open sql,conn,1,1
		if rs.eof or rs.bof then
			exit sub
		else
			allcount=rs.recordcount
			for i=1 to rs.recordcount
				if arrName(j)<>rs("player_profession") then
					j=j+1
					arrNum(j)=1
					arrName(j)=rs("player_profession")
				else
					if datediff("d",rs("player_lastraid"),now()) < activityday then
						arrANum(j)=arrANum(j)+1
						allAcount=allAcount+1
					end if
					arrNum(j)=arrNum(j)+1
				end if
				rs.movenext
			next
		end if
	rs.close

	Response.write "<div class='outframe' id='proview'><h3>职业比率 ( 目前共 "&allcount&" 人,其中 "&allAcount&" 人近"&activityday&"天内活跃 , 公会活力 "&int(allAcount/allcount*100)&"% )</h3><ul>"
	for i = 1 to 12
		if arrName(i)="" or arrName(i)="未知" then
		else
		Response.write "<li>"&arrName(i)&":"&arrNum(i)&"人 活跃:"&arrANum(i)&"<img src='"&StylePath&"/images/ga.gif' width='"&cint(arrNum(i)/allcount*200)&"%' height='16px'><img src='"&StylePath&"/images/gall.gif' width='"&cint(arrANum(i)/allcount*200)&"%' height='16px'></li>"
		end if
	next
	Response.write "</ul></div>"
end sub

%>